SQL Table Editor Filtering

The SQL Table Editor component enables you to filter results using the following methods:

  • Popup Mode: This is the default filtering mode. With this mode, you can activate filtering by selecting the filter icon in the column header, which opens a dialog box.

    The filter icon is a black funnel at the right-hand side of the header. It is outlined and the filter dialog box displays

    The dialog box contains fields that enable you to create filtering criteria, for example, value is greater than 18 and is less than 60. The filter has multiple parts: the top field is a combo box and the lower field is the field filter editor. In the top field, you can use filter operators like Is equal to or Is less than that change based on the data type of the column. The field filter editor provides filtering criteria based on the data type of the column. For example, if you have a date column, you can use a date/time picker control as the filtering criteria.

  • Filter Row Mode: This filtering mode is built into the header cell of each filterable column. It is simpler to use than the dialog box and uses only one field editor to filter. All filters start as empty until a value is entered into the editor. Select the filter icon to display a drop-down list of all operators available to the data type of the column. If you select Clear Filter from the list, it will clear and reset the column filter.

    Filter Row is enabled and the filter icon is selected to show options

You can configure the Filter Mode property of the SQL Table Editor to use either of the modes.

  1. Go to the SQL Table Editor Component Properties tab.

  2. In the SQL Table Editor section, set the Filter Mode property to either Filter Row or Popup. The default setting is Popup.

NOTE: Consolidated column filtering is not supported for certain data types. Applying filters on these data types will not yield consolidated filtered results. The following data types are unsupported: Binary, char, date, datetime2, datetimeoffset, float, geography, geometry, hierarchyid, image, filestream, money, nchar, ntext, numeric, nvarchar, real, rowversion, smalldatetime, smallmoney, sql_variant, text, time, timestamp, tinyint, varbinary, and xml.

Filtering Columns Based on Values from Another Column

You can base a column’s header filter on values from another column. This includes any column that is in the dataset, even if the column is hidden. This is useful for name-value pair parameter columns as long as the values and names are pulled from individual columns.

Set up and configure the SQL Table Editor component:

  1. In the Workspace, create and configure an SQL Table Editor component according to your needs. See SQL Table Editor.

  2. Identify the column to filter along with the column the filter is based on.

  3. In the SQL Table Editor component, configure the column format for the column to filter by entering the name of the column in the FilterByColumnName property.

Example

Begin with an SQL Table Editor grid. The dataset can come from a SQL view or a SQL table.

Filtering Columns Based on Values from Another Column

When filtering data using a column header filter, the default behavior is to filter by the value stored in that column. For example, filtering the ProdID column on a value of 10 returns one row where ProdID equals 10.

The filter editor field has the value 10 and the second image shows the table filtered to one entry with the value 10 for ProdID

To change the ProdID column filter to base it on ProductName, configure the column format for ProdID by setting FilterByColumnName to ProductName.

Column Format 1 shows FilterByColumnName set to ProductName

Column filtering for column ProdID is now based on values from the ProductName column.